<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
// 1, 去掉字符串123@zh@qq.com中的@;
var str1="123@zh@qq.com";
var newStr1=str1.replace(/@/,"");
console.log(newStr1);


// 2, 任意给定的一串字符，统计字符串里面的大写字母和小写字母的个数
var str2="sefusfhosoONFFAFGNoinvoP3593959498985";
var maxCount=0;
var minCount=0;
for(var i=0;i<str2.length;i++){
    if(str2[i]>="A"&&str2[i]<="Z"){
        maxCount++;
    }
    if(str2[i]>="a"&&str2[i]<="z"){
        minCount++;
    }
}
console.log(minCount,maxCount);



// 3, https://www.baidu.com/s?name=avery&age=20&sex=male ,  取出name, age和sex的值 (split)
    var str3="https://www.baidu.com/s?name=avery&age=20&sex=male";
    var arr=str3.split("?")[1].split("&");
    var arr2=[];
    for(var i=0;i<arr.length;i++){
        var temp=arr[i].split("=")[1];
        arr2.push(temp);
    }
    console.log(arr2);


    </script>
</body>
</html>